package com.jc.camerascan.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.jc.camerascan.R;
import com.jc.camerascan.entity.IdcardResult;
import com.jc.camerascan.entity.TableRecognitionResult;

/**
 * @ProjectName: PhotoRecognition
 * @Package: com.jc.camerascan.adapter
 * @ClassName: ScanResultNineAdapter
 * @Description: java类作用描述
 * @Author: XuChi
 * @CreateDate: 2020/7/28 16:23
 * @Version: 1.0
 */
public class ScanResultNineAdapter extends BaseQuickAdapter<IdcardResult.WordsResultBean, BaseViewHolder> {

    public ScanResultNineAdapter() {
        super(R.layout.item_scan_result_four);
    }

    @Override
    protected void convert(BaseViewHolder helper, IdcardResult.WordsResultBean item) {
        helper.setText(R.id.text_one, "地址：" + item.getAddress());
        helper.setText(R.id.text_two, "生日：" + item.getBirthday());
        helper.setText(R.id.text_three, "姓名：" + item.getName());
        helper.setText(R.id.text_four, "身份证号：" + item.getIdnumber());
        helper.setText(R.id.text_five, "性别：" + item.getSex());
        helper.setText(R.id.text_six, "民族：" + item.getNation());

        helper.setVisible(R.id.text_one, true);
        helper.setVisible(R.id.text_two, true);
        helper.setVisible(R.id.text_three, true);
        helper.setVisible(R.id.text_four, true);
        helper.setVisible(R.id.text_five, true);
        helper.setVisible(R.id.text_six, true);
        helper.setVisible(R.id.text_seven, false);
        helper.setVisible(R.id.text_eight, false);
        helper.setVisible(R.id.text_nine, false);
        helper.setVisible(R.id.text_ten, false);
        helper.setVisible(R.id.text_eleven, false);
        helper.setVisible(R.id.text_twelve, false);
    }
}

